package com.wanmait.happyheating.controller.websockettest;


import com.wanmait.happyheating.websocket.WebSocketServer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
@RequestMapping("user")
public class WebsocketController {

    @RequestMapping("sendMessage")
    public void sendMessage(){
        try {
            WebSocketServer.sendInfo("<h1>这里是controller</h1>");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
